import numpy as np
import os
import scipy.io as sio

# a_dir='/data-disk/liax/tmp/3/VOC2007/JPEGImages/'
# b_dir='/data_4t/Kaggle/submission_code_data/data/faster_rcnn_data/v9/JPEGImages/'

a_dir='/data-disk/liax/bak/3/VOC2007/JPEGImages/'
b_dir='/data_4t/Kaggle/submission_code_data/data/faster_rcnn_data/v15/JPEGImages/'

D=os.listdir(a_dir)
for i in xrange(len(D)):
    name=D[i]
    print i,name
    # a=np.load(a_dir+name)
    a=sio.loadmat(a_dir+name)
    a=a['img']
    # b=sio.loadmat(b_dir+name[0:len(name)-4]+'.mat')
    b=sio.loadmat(b_dir+name)
    b=b['img']
    if np.sum(a-b)>0:
        print i,'************************************'
        break
  